package com.tailyou.hms.neteasecloudmusic;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.Toast;

public class LoginActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        CheckBox cbItem = findViewById(R.id.cbItem);
        findViewById(R.id.btnLogin).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (cbItem.isChecked()) {
                    startActivity(new Intent(LoginActivity.this, PhoneLoginActivity.class));
                    finish();
                } else {
                    Toast.makeText(LoginActivity.this, "请先阅读并同意服务条款和隐私政策", Toast.LENGTH_SHORT).show();
                }
            }
        });
    }

}